home *** CD-ROM | disk | FTP | other *** search
/ Leonardo daVinci / LEODAVINCI.ISO / DATA / G2.Dxr / 00161_Level 3 frame script.ls < prev    next >
Encoding:
Text File  |  1996-11-22  |  5.3 KB  |  161 lines

  1. global vCurG2SubEntryObj, vCurG2PageObj, sL3OriginalText, sL3English, sL3PrevPage, sL3NextPage, sL3Hilite, sL3Image, vSpriteParty, cMagMinus, cUp, cLeft, cRight, cDown, cLeftU, cLeftD, cRightU, cRightD, vImgLeft, vImgTop, vImgRight, vImgBottom, vStageWnd, vHdl, vImgWidth, vImgHeight, gL3Rect0, gL3Rect1, gL3Rect2, gL3Rect3, gL3Rect4, gL3Rect5, gL3Rect6, gL3Scroll1, gL3Scroll2, gL3Scroll3, gL3Scroll4, gL3Scroll5, gL3Scroll6, vStandardNavObjects, iBHE, fRestoreContext, vRestoreContext
  2.  
  3. on enterFrame
  4.   if fRestoreContext then
  5.     set theG2PageSub to getaProp(vRestoreContext, #G2PageSub)
  6.     set theG2PageObj to getAt(vG2PageObjList, theG2PageSub)
  7.     L3Hello(theG2PageObj)
  8.     set fRestoreContext to 0
  9.   end if
  10. end
  11.  
  12. on exitFrame
  13.   set p to point(the mouseH, the mouseV)
  14.   if objectp(vCurG2PageObj) then
  15.     roll(getAt(vStandardNavObjects, iBHE), p)
  16.     set screenImageHeight to 450
  17.   else
  18.     set screenImageHeight to 480
  19.   end if
  20.   set gL3Rect0 to rect(85, 85, 555, screenImageHeight - 85)
  21.   set gL3Rect1 to rect(73, 73, 567, screenImageHeight - 73)
  22.   set gL3Rect2 to rect(61, 61, 579, screenImageHeight - 61)
  23.   set gL3Rect3 to rect(49, 49, 591, screenImageHeight - 49)
  24.   set gL3Rect4 to rect(37, 37, 603, screenImageHeight - 37)
  25.   set gL3Rect5 to rect(25, 25, 615, screenImageHeight - 25)
  26.   set gL3Rect6 to rect(0, 0, 640, screenImageHeight)
  27.   if inside(p, gL3Rect0) then
  28.     set scrollTF to 0
  29.     set scrollVal to 0
  30.   else
  31.     if inside(p, gL3Rect1) then
  32.       set scrollTF to 1
  33.       set scrollVal to gL3Scroll1
  34.     else
  35.       if inside(p, gL3Rect2) then
  36.         set scrollTF to 1
  37.         set scrollVal to gL3Scroll2
  38.       else
  39.         if inside(p, gL3Rect3) then
  40.           set scrollTF to 1
  41.           set scrollVal to gL3Scroll3
  42.         else
  43.           if inside(p, gL3Rect4) then
  44.             set scrollTF to 1
  45.             set scrollVal to gL3Scroll4
  46.           else
  47.             if inside(p, gL3Rect5) then
  48.               set scrollTF to 1
  49.               set scrollVal to gL3Scroll5
  50.             else
  51.               if inside(p, gL3Rect6) then
  52.                 set scrollTF to 1
  53.                 set scrollVal to gL3Scroll6
  54.               end if
  55.             end if
  56.           end if
  57.         end if
  58.       end if
  59.     end if
  60.   end if
  61.   if scrollTF then
  62.     set scrollx to 0
  63.     if inside(p, rect(0, 0, 85, screenImageHeight)) then
  64.       if vImgLeft > 0 then
  65.         set scrollx to max(-scrollVal, 0 - vImgLeft)
  66.       end if
  67.     else
  68.       if inside(p, rect(555, 0, 640, screenImageHeight)) then
  69.         if vImgRight < vImgWidth then
  70.           set scrollx to min(scrollVal, vImgWidth - vImgRight)
  71.         end if
  72.       end if
  73.     end if
  74.     set scrolly to 0
  75.     if inside(p, rect(0, 0, 640, 85)) then
  76.       if vImgTop > 0 then
  77.         set scrolly to max(-scrollVal, 0 - vImgTop)
  78.       end if
  79.     else
  80.       if inside(p, rect(0, screenImageHeight - 85, 640, screenImageHeight)) then
  81.         if vImgBottom < vImgHeight then
  82.           set scrolly to min(scrollVal, vImgHeight - vImgBottom)
  83.         end if
  84.       end if
  85.     end if
  86.     if (scrollx = 0) and (scrolly = 0) then
  87.       set scrollTF to 0
  88.     end if
  89.   end if
  90.   if scrollTF then
  91.     if (scrollx <> 0) and (scrolly <> 0) then
  92.       if scrollx < 0 then
  93.         if scrolly < 0 then
  94.           set the cursor of sprite sL3Image to cLeftU
  95.         else
  96.           set the cursor of sprite sL3Image to cLeftD
  97.         end if
  98.       else
  99.         if scrolly < 0 then
  100.           set the cursor of sprite sL3Image to cRightU
  101.         else
  102.           set the cursor of sprite sL3Image to cRightD
  103.         end if
  104.       end if
  105.     else
  106.       if scrollx <> 0 then
  107.         if scrollx < 0 then
  108.           set the cursor of sprite sL3Image to cLeft
  109.         else
  110.           set the cursor of sprite sL3Image to cRight
  111.         end if
  112.       else
  113.         if scrolly < 0 then
  114.           set the cursor of sprite sL3Image to cUp
  115.         else
  116.           set the cursor of sprite sL3Image to cDown
  117.         end if
  118.       end if
  119.     end if
  120.     set vImgLeft to vImgLeft + scrollx
  121.     set vImgTop to vImgTop + scrolly
  122.     set vImgRight to vImgRight + scrollx
  123.     set vImgBottom to vImgBottom + scrolly
  124.     Corbis_ShowImage(vStageWnd, vHdl, vImgLeft, vImgTop, vImgRight, vImgBottom, 0, 0)
  125.   else
  126.     set the cursor of sprite sL3Image to cMagMinus
  127.   end if
  128.   case checkFocusSwitch() of
  129.     #onTop, #notOnTop, #switch:
  130.       Corbis_ShowImage(vStageWnd, vHdl, vImgLeft, vImgTop, vImgRight, vImgBottom, 0, 0)
  131.     #noSwitch:
  132.       nothing()
  133.   end case
  134.   puppetPalette(the framePalette)
  135.   go(the frame)
  136. end
  137.  
  138. on idle
  139.   if rollOver(sL3OriginalText) then
  140.     set the member of sprite sL3Hilite to member "L3UIbarOriginal glo" of castLib "G2_g"
  141.     set the loc of sprite sL3Hilite to point(320, 240)
  142.   else
  143.     if rollOver(sL3English) then
  144.       set the member of sprite sL3Hilite to member "L3UIbarEnglish glo" of castLib "G2_g"
  145.       set the loc of sprite sL3Hilite to point(320, 240)
  146.     else
  147.       if rollOver(sL3PrevPage) then
  148.         set the member of sprite sL3Hilite to member "L3UIbarPrevPage glo" of castLib "G2_g"
  149.         set the loc of sprite sL3Hilite to point(320, 240)
  150.       else
  151.         if rollOver(sL3NextPage) then
  152.           set the member of sprite sL3Hilite to member "L3UIbarNextPage glo" of castLib "G2_g"
  153.           set the loc of sprite sL3Hilite to point(320, 240)
  154.         else
  155.           set the loc of sprite sL3Hilite to vSpriteParty
  156.         end if
  157.       end if
  158.     end if
  159.   end if
  160. end
  161.